package org.bsplus.rpc.dto;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class IssueDTO extends AbstractDTO
{
	private String summary;
	private String description;
	private ProjectDTO project;
	private IssueTypeDTO issueType;
	private Long issueNumber;
	private IssueStatusDTO issueStatus;
	private UserDTO assignee;
	private IssueSeverityDTO issueSeverity;
	private Date created;
	private UserDTO createdBy;
	private List<CommentDTO> comments = new ArrayList<CommentDTO>();

	/**
	 * @return the summary
	 */
	public String getSummary()
	{
		return summary;
	}

	/**
	 * @param summary
	 *            the summary to set
	 */
	public void setSummary(String summary)
	{
		this.summary = summary;
	}

	/**
	 * @return the description
	 */
	public String getDescription()
	{
		return description;
	}

	/**
	 * @param description
	 *            the description to set
	 */
	public void setDescription(String description)
	{
		this.description = description;
	}

	/**
	 * @return the project
	 */
	public ProjectDTO getProject()
	{
		return project;
	}

	/**
	 * @param project
	 *            the project to set
	 */
	public void setProject(ProjectDTO project)
	{
		this.project = project;
	}

	/**
	 * @return the issueType
	 */
	public IssueTypeDTO getIssueType()
	{
		return issueType;
	}

	/**
	 * @param issueType
	 *            the issueType to set
	 */
	public void setIssueType(IssueTypeDTO issueType)
	{
		this.issueType = issueType;
	}

	/**
	 * @return the issueNumber
	 */
	public Long getIssueNumber()
	{
		return issueNumber;
	}

	/**
	 * @param issueNumber
	 *            the issueNumber to set
	 */
	public void setIssueNumber(Long issueNumber)
	{
		this.issueNumber = issueNumber;
	}

	public String getFullIssueNumber()
	{
		return getProject().getCode() + "-" + getIssueNumber();
	}

	/**
	 * @return the issueStatus
	 */
	public IssueStatusDTO getIssueStatus()
	{
		return issueStatus;
	}

	/**
	 * @param issueStatus
	 *            the issueStatus to set
	 */
	public void setIssueStatus(IssueStatusDTO issueStatus)
	{
		this.issueStatus = issueStatus;
	}

	/**
	 * @return the assignee
	 */
	public UserDTO getAssignee()
	{
		return assignee;
	}

	/**
	 * @param assignee
	 *            the assignee to set
	 */
	public void setAssignee(UserDTO assignee)
	{
		this.assignee = assignee;
	}

	/**
	 * @return the issueSeverity
	 */
	public IssueSeverityDTO getIssueSeverity()
	{
		return issueSeverity;
	}

	/**
	 * @param issueSeverity
	 *            the issueSeverity to set
	 */
	public void setIssueSeverity(IssueSeverityDTO issueSeverity)
	{
		this.issueSeverity = issueSeverity;
	}

	/**
	 * @return the created
	 */
	public Date getCreated()
	{
		return created;
	}

	/**
	 * @param created
	 *            the created to set
	 */
	public void setCreated(Date created)
	{
		this.created = created;
	}

	/**
	 * @return the createdBy
	 */
	public UserDTO getCreatedBy()
	{
		return createdBy;
	}

	/**
	 * @param createdBy
	 *            the createdBy to set
	 */
	public void setCreatedBy(UserDTO createdBy)
	{
		this.createdBy = createdBy;
	}

	/**
	 * @return the comments
	 */
	public List<CommentDTO> getComments()
	{
		return comments;
	}

	/**
	 * @param comments
	 *            the comments to set
	 */
	public void setComments(List<CommentDTO> comments)
	{
		this.comments = comments;
	}
}
